<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath }"></c:set>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>平台管理-组织结构</title>
    <link href="${path }/css/style.css" rel="stylesheet" type="text/css">
    <link href="${path }/radar/configurationModel/css/add_index.css" rel="stylesheet" type="text/css">
    <link href="${path }/common/plugins/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css">
    <script src="${path }/js/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="${path }/js/user_js.js"></script>
    <script src="${path }/common/plugins/bootstrap/js/bootstrap.js"></script>
    <script src="${path }/common/plugins/layer/layer.js"></script>
    <script src="${path }/common/plugins/autocomplete/jquery.autocomplete.js"></script>
    <link href="${path }/common/plugins/autocomplete/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
    <script src="${path }/js/Validform.js"></script>
</head>
<body>
<input type="hidden" id="partNames" value="${partNames }"/>
<div style="margin-bottom:35px;" id="indicatorForm">
    <div class="content_condition contentselect">
        <div class="content_group" id="platform">
            <ul class="checkhide">
            	<c:forEach items="${listPlatform }" var="plat">
	                <li><input type="checkbox" onclick="platformThreshold(this)" value="${plat.platformId }" checked="checked"/>${plat.name }</li>
            	</c:forEach>
            </ul>
        </div>
        <div class="content_group">
            <div class="span4">
            <label class="control-label">指标项名称:</label>
            <div class="controls">
                <input id="indicatorsName" type="text" onblur="checkNotNull(this)" maxlength="50"/>
                <span id="indicatorsNameTip" style="color:red;">*</span>
            </div>
        </div>
        </div>
        <div class="content_group">
            <div class="span4">
                <label class="control-label">部件名称:</label>
                <div class="controls imagebox" >
                    <input id="partName" type="text" onblur="checkNotNull(this)" maxlength="50"/>
                	<span id="partNameTip" style="color:red;">*</span>
                    <span class="imgbtn"><img src="../../images/accessories/default.png" style="" title="点击显示图标" class="tubiao" /></span>
                    <div class="box_accessories">
                        <a><img src="../../images/accessories/cpu.png" /></a>
                        <a><img src="../../images/accessories/Memory.png"  /></a>
                        <a><img src="../../images/accessories/Network.png"  /></a>
                        <a><img src="../../images/accessories/Hard.png"  /></a>
                        <a><img src="../../images/accessories/Power.png" /></a>
                        <a><img src="../../images/accessories/Pic.png"  /></a>
                        <a><img src="../../images/accessories/System_back.png"  /></a>
                        <a><img src="../../images/accessories/default.png"  /></a>
                    </div>
                </div>
            </div>
        </div>
        <div class="content_group">
        	<div class="span4">
	            <label class="control-label">指标项编码:</label>
	            <div class="controls">
	                <input id="indicatorsCode" type="text" onblur="checkBecodeExist();" maxlength="50"/>
	                <span id="regularTip" style="color:red;">*</span>
	            </div>
	    	</div>
        </div>
        <div class="last_group">
            <div class="span4">
                <label class="control-label">类型:</label>
                <div class="controls">
                    <select id="indicatorsType">
                    	<c:forEach items="${listType }" var="type">
                        	<option value="${type.lookupCode }">${type.cdeName }</option>
                        </c:forEach>
                    </select>
                </div>
            </div>
        </div>
        <div class="last_group" id="baseLineDiv" style="display:none;">
	        <div class="span4">
	            <label class="control-label">是否有基线:</label>
	            <div class="controls">
					<label class="radio inline" style="padding-top:0px;"><input type="radio" name="baseLine" value="1" checked="checked">是</label>
					<label class="radio inline" style="padding-top:0px;"><input type="radio" name="baseLine" value="0" >否</label>
	            </div>
	        </div>
    	</div>
    	<div class="last_group" id="processType">
	        <div class="span4">
	            <label class="control-label">进程类型:</label>
	            <div class="controls">
					<label class="radio inline" style="padding-top:0px;"><input type="radio" name="processType" onclick="stateTypeChange(this);" value="93f" checked="checked">性能</label>
					<label class="radio inline" style="padding-top:0px;"><input type="radio" name="processType" onclick="stateTypeChange(this);" value="93b" >状态</label>
	            </div>
	        </div>
    	</div>
    	<!-- <div class="last_group">
                <label class="radio inline">
                    <input type="radio" name="option" onclick="stateTypeChange(this);" checked  value="property"  class="styled" >
                    性能
                </label>
                <label class="radio inline">
                    <input type="radio" name="option" onclick="stateTypeChange(this);" value="state"  class="styled">
                    状态
                </label>
                <button class="press_btn1" name="proc_stat_button" onclick="addWarningKeyWord('proc_state_tbody_default');" style="float:right;display:none;">
                	<i class="add top_current"></i>添加关键字
                </button>
            </div> -->
    </div>
    <!--性能-->
    <div class="content_condition" id="perf_default">
        <p class="current_title">默认阀值区域</p>
        <div>
            <div class="content_group" style="border-top: 1px solid #eee">
                <div class="span12">
                    <label class="control-label" style="width: 12%">warning:</label>
                    <div class="controls">
                        在<input type="text" id="perf_warning_intime_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                        分钟内超过<input type="text" id="perf_warning_num_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                        次告警&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;阀值范围
                        (<input type="text" id="perf_warning_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                        ~<input type="text" id="perf_warning_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                    </div>
                </div>
            </div>
            <div class="content_group">
                <div class="span12">
                    <label class="control-label">error:</label>
                    <div class="controls">
                        在<input type="text" id="perf_error_intime_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                        分钟内超过<input type="text" id="perf_error_num_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                        次告警&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;阀值范围
                        (<input type="text" id="perf_error_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                        ~<input type="text" id="perf_error_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                    </div>
                </div>
            </div>
            <div class="content_group">
                <div class="span12">
                    <label class="control-label">critical:</label>
                    <div class="controls">
                        在<input type="text" id="perf_critical_intime_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                        分钟内超过<input type="text" id="perf_critical_num_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                        次告警&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;阀值范围
                        (<input type="text" id="perf_critical_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                        ~<input type="text" id="perf_critical_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                    </div>
                </div>
            </div>
            <div class="last_group">
                <div class="span12">
                    <label class="control-label">lower warning:</label>
                    <div class="controls">
                        在<input type="text" id="perf_lower_intime_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                        分钟内超过<input type="text" id="perf_lower_num_default" onblur="volidateInterval(this);" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                        次告警&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;阀值范围
                        (<input type="text" id="perf_lower_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                        ~<input type="text" id="perf_lower_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--容量-->
    <div  class="content_condition" id="capa_default">
        <p class="current_title">默认阀值区域</p>
        <div style="border-top: 1px solid #eee">
            <div class="content_group">
                <div class="span12">
                    <label class="control-label">warning:</label>
                    <div class="controls">
                        阀值范围
                        (<input type="text" id="capa_warning_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                        ~<input type="text" id="capa_warning_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                    </div>
                </div>
            </div>
            <div class="content_group">
                <div class="span12">
                    <label class="control-label">error:</label>
                    <div class="controls">
                        阀值范围
                        (<input type="text" id="capa_error_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                        ~<input type="text" id="capa_error_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                    </div>
                </div>
            </div>
            <div class="content_group">
                <div class="span12">
                    <label class="control-label">critical:</label>
                    <div class="controls">
                        阀值范围
                        (<input type="text" id="capa_critical_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                        ~<input type="text" id="capa_critical_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                    </div>
                </div>
            </div>
            <div class="last_group">
                <div class="span12">
                    <label class="control-label">lower warning:</label>
                    <div class="controls">
                        阀值范围
                        (<input type="text" id="capa_lower_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                        ~<input type="text" id="capa_lower_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--数据库-->
    <div  class="content_condition" id="db_default">
        <p class="current_title">默认阀值区域</p>
        <div style="border-top: 1px solid #eee">
            <div class="content_group">
                <div class="span12">
                    <label class="control-label">warning:</label>
                    <div class="controls">
                        阀值范围
                        (<input type="text" id="db_warning_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                        ~<input type="text" id="db_warning_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                    </div>
                </div>
            </div>
            <div class="content_group">
                <div class="span12">
                    <label class="control-label">error:</label>
                    <div class="controls">
                        阀值范围
                        (<input type="text" id="db_error_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                        ~<input type="text" id="db_error_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                    </div>
                </div>
            </div>
            <div class="content_group">
                <div class="span12">
                    <label class="control-label">critical:</label>
                    <div class="controls">
                        阀值范围
                        (<input type="text" id="db_critical_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                        ~<input type="text" id="db_critical_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                    </div>
                </div>
            </div>
            <div class="last_group">
                <div class="span12">
                    <label class="control-label">lower warning:</label>
                    <div class="controls">
                        阀值范围
                        (<input type="text" id="db_lower_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                        ~<input type="text" id="db_lower_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--进程-->
    <div class="content_condition" id="proc_default">
        <p class="current_title">默认阀值区域</p>
        <div style="border-top: 1px solid #eee">
            <div class="content_condition" id="Performance" style="margin:2px 5px;">
                <div class="content_group">
                    <div class="span12">
                        <label class="control-label">warning:</label>
                        <div class="controls">
                            在<input type="text" id="proc_perf_warning_intime_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                            分钟内超过<input type="text" id="proc_perf_warning_num_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                            次告警&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;阀值范围
                            (<input type="text" id="proc_perf_warning_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                            ~<input type="text" id="proc_perf_warning_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                        </div>
                    </div>
                </div>
                <div class="content_group">
                    <div class="span12">
                        <label class="control-label">error:</label>
                        <div class="controls">
                            在<input type="text" id="proc_perf_error_intime_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                            分钟内超过<input type="text" id="proc_perf_error_num_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                            次告警&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;阀值范围
                            (<input type="text" id="proc_perf_error_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                            ~<input type="text" id="proc_perf_error_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                        </div>
                    </div>
                </div>
                <div class="content_group">
                    <div class="span12">
                        <label class="control-label">critical:</label>
                        <div class="controls">
                            在<input type="text" id="proc_perf_critical_intime_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                            分钟内超过<input type="text" id="proc_perf_critical_num_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                            次告警&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;阀值范围
                            (<input type="text" id="proc_perf_critical_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                            ~<input type="text" id="proc_perf_critical_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                        </div>
                    </div>
                </div>
                <div class="last_group">
                    <div class="span12">
                        <label class="control-label">lower warning:</label>
                        <div class="controls">
                            在<input type="text" id="proc_perf_lower_intime_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                            分钟内超过<input type="text" id="proc_perf_lower_num_default" onblur="volidateInterval(this);" class="input-mini offset-mini"/>
                            次告警&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;阀值范围
                            (<input type="text" id="proc_perf_lower_from_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>
                            ~<input type="text" id="proc_perf_lower_to_default" onblur="volidateRange(this)" class="input-mini offset-mini"/>)
                        </div>
                    </div>
                </div>
            </div>
            <div class="content_condition" id="State" style="margin:2px 5px;border: 0!important;display:none;">
                <div class="last_group">
	                <button class="press_btn1" name="proc_stat_button" onclick="addWarningKeyWord('proc_state_tbody_default');" style="float:right;margin-bottom:3px;">
	                	<i class="add top_current"></i>添加关键字
	                </button>
                </div>
                <div class="content_table">
                    <table class="table table-striped table-bordered table-hover table-ellipsis details">
                        <thead>
                        <tr>
                            <th>关键字</th>
                            <th>类别</th>
                            <th>告警级别</th>
                            <th width="50px">操作</th>
                        </tr>
                        </thead>
                        <tbody id="proc_state_tbody_default">
	                        
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <!--状态-->
    <div class="content_condition" id="stat_default">
        <p class="current_title">默认阀值区域</p>
        <div style="border-top: 1px solid #eee">
            <div class="content_condition" id="States" style="margin:2px 5px;border: 0!important;">
                <button class="press_btn1" name="stat_button" onclick="addWarningKeyWord('state_tbody_default');" style="float:right;margin-bottom:3px;display:block;">
                	<i class="add top_current"></i>添加关键字
                </button>
                <div class="content_table" style="overflow:visible!important;">
                    <table class="table table-striped table-bordered table-hover table-ellipsis details">
                        <thead>
                        <tr>
                            <th>关键字</th>
                            <th>类别</th>
                            <th>告警级别</th>
                            <th width="50px">操作</th>
                        </tr>
                        </thead>
                        <tbody id="state_tbody_default">
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="btn_bottom">
    <div class="spanbtn">
        <button class="press_btn1" onclick="saveIndicators()"><i class="save top_current"></i>保存</button>
        <button class="press_btn2" onclick="closeIndicators()"><i class="del top_current"></i>关闭</button>
    </div>
</div>
</body>
<script src="add_index.js"></script>
</html>